from flask import Blueprint,render_template,g,redirect
from app.models import User
from app import db

bop_server_page = Blueprint('bop_server_page',__name__,template_folder='templates')
@bop_server_page.route('/bop-server',methods = ['GET','POST'])
def bop_server():
    if g.user is not None and g.user.is_authenticated:
        hs_current_id = str(g.user).replace("'", "")
        hs_current_user = db.session.query(User.username).filter_by(id = hs_current_id).first()[0]
        print(1)
    else:
        return redirect('/login')
    return render_template('hs-bop-server.html',hs_current_user=hs_current_user)

